package Server;

public class Account {

	private int passnumber, pincode, balance;

	public Account(int passnumber, int pincode, int balance) {
		this.passnumber = passnumber;
		this.pincode = pincode;
		this.balance = balance;
	}

	public int getPassnumber() {
		return passnumber;
	}

	public int getPincode() {
		return pincode;
	}
	
	public int balance(){
		return balance;
	}

	public int withdraw(int amount) {
		if (balance - amount < 0) {
			return -1;
		}
		balance -= amount;
		return balance;
	}
}
